#pragma GCC optimize(2)
#include <iostream>
#include <algorithm>
#include <cstring>
#include <string>
#include <map>
#include <vector>

using namespace std;
using LL = long long;

int op1[2][2] = {{1, 1}, {1, 3}};
int op2[4][2] = {{2, 1}, {2, 2}, {2, 3}, {2, 4}};

/*
solution:
1: put type1 traingle in the first row
2: put type2 traingle in the second and third row

*/

int main(){
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
    ios::sync_with_stdio(false);
    cin.tie(nullptr);


    int cnt0 = 0, cnt1 = 0;
    string s;
    cin >> s;

    for(int i = 0; i < s.size(); i ++){
        int k = s[i] - '0';
        
        if(k == 1){
            cout << op1[cnt0][0] << " " << op1[cnt0][1] << '\n';
            cnt0 = (cnt0 + 1) % 2;
        }else{ // k == 1
            cout << op2[cnt1][0] << " " << op2[cnt1][1] << '\n';
            cnt1 = (cnt1 + 1) % 4;
        }
    }


    return 0;
}